<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
cfc('core')->checklogin();
if($_RQ['op']=='main'){
	$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
	$setting=$this->plugin_setting('setting');
	$setting['hdps']=json_decode($setting['hdps'],true);
	$setting['bankuai2']=json_decode($setting['bankuai2'],true);
	foreach($setting['bankuai2'] as $item){
		if($item['is_install'] == 0){
			unset($item);
		}
	}
	$setting['footernav']=json_decode($setting['footernav'],true);
	$return['setting']=$setting;
	$return['item']=pdo_get('core_members',array('id'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']),array('credit1','credit2','mobile','groupid','avatar','nickname'));
	if(!$return['item']){
		exi('找不到会员信息！','error');
	}
	if($return['item']['groupid']){
		$return['item']['group']=pdo_getcolumn('core_member_groups',array('id'=>$return['item']['groupid'],'uniacid'=>$_SESSION['uniacid']),'title');
	}else{
		$return['item']['group']='普通会员';
	}
	if($this->plugin_exists('jy_dish')){
		$staff = pdo_get('jy_dish_staff',array('uniacid'=>$_SESSION['uniacid'],'store_id'=>$store_id,'mid'=>$_SESSION['uid']),array('id'));
		$return['staff']=$staff;
	}
	
	set_html('title','会员中心');
	exi($return);
	
}
		
?>